package com.bsth.java7;

import java.math.BigDecimal;

/**
 * Created by BSTH on 2017/6/22.
 */
public class New01 {
	//public static void main(String[] args) {
	//	String str = "str";
	//	switch (str) {
	//		case "str":
	//			System.out.println(str); break;
	//	}
	//}
	private static boolean verbose = false;
	private static boolean logging = false;
	private static boolean displayHelp = false;

	public static void main(String[] args) {
		int i = 3;
		System.out.println(i);
		i = i << 2;
		System.out.println(i);
		i = i >> 1;
		System.out.println(i);
		System.out.println(10>>>2);


		for (String argument : args) {
			switch (argument) {
				case "-verbose":
				case "-v":
					verbose = true;
					break;
				case "-log":
					logging = true;
					break;
				case "-help":
					displayHelp = true;
					break;
				default:
			}
		}

		System.out.println("Illegal command line argument");
		displayApplicationSettings();
	}

	private static void displayApplicationSettings() {
		System.out.println("Application Settings");
		System.out.println("Verbose: " + verbose);
		System.out.println("Logging: " + logging);
		System.out.println("Help: " + displayHelp);
	}
}
